package ar.com.muebleria.beans;

public class SubFamilia {
	private Familia familia;
	private String subFamiliaId;
	private int stockMaximo;
	private int stockMinimo;
	private double precio;
	/**
	 * @return the familia
	 */
	public Familia getFamilia() {
		return familia;
	}
	/**
	 * @param familia the familia to set
	 */
	public void setFamilia(Familia familia) {
		this.familia = familia;
	}
	/**
	 * @return the subFamiliaId
	 */
	public String getSubFamiliaId() {
		return subFamiliaId;
	}
	/**
	 * @param subFamiliaId the subFamiliaId to set
	 */
	public void setSubFamiliaId(String subFamiliaId) {
		this.subFamiliaId = subFamiliaId;
	}
	/**
	 * @return the stockMaximo
	 */
	public int getStockMaximo() {
		return stockMaximo;
	}
	/**
	 * @param stockMaximo the stockMaximo to set
	 */
	public void setStockMaximo(int stockMaximo) {
		this.stockMaximo = stockMaximo;
	}
	/**
	 * @return the stockMinimo
	 */
	public int getStockMinimo() {
		return stockMinimo;
	}
	/**
	 * @param stockMinimo the stockMinimo to set
	 */
	public void setStockMinimo(int stockMinimo) {
		this.stockMinimo = stockMinimo;
	}
	/**
	 * @return the precio
	 */
	public double getPrecio() {
		return precio;
	}
	/**
	 * @param precio the precio to set
	 */
	public void setPrecio(double precio) {
		this.precio = precio;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((familia == null) ? 0 : familia.hashCode());
		long temp;
		temp = Double.doubleToLongBits(precio);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + stockMaximo;
		result = prime * result + stockMinimo;
		result = prime * result
				+ ((subFamiliaId == null) ? 0 : subFamiliaId.hashCode());
		return result;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SubFamilia other = (SubFamilia) obj;
		if (familia == null) {
			if (other.familia != null)
				return false;
		} else if (!familia.equals(other.familia))
			return false;
		if (Double.doubleToLongBits(precio) != Double
				.doubleToLongBits(other.precio))
			return false;
		if (stockMaximo != other.stockMaximo)
			return false;
		if (stockMinimo != other.stockMinimo)
			return false;
		if (subFamiliaId == null) {
			if (other.subFamiliaId != null)
				return false;
		} else if (!subFamiliaId.equals(other.subFamiliaId))
			return false;
		return true;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "SubFamilia [familia=" + familia + ", subFamiliaId="
				+ subFamiliaId + ", stockMaximo=" + stockMaximo
				+ ", stockMinimo=" + stockMinimo + ", precio=" + precio + "]";
	}
	
	
	
}
